<script type="text/javascript">
    $(document).ready (function () {
        $('#index').tooltip({ trigger: 'hover focus' })	
    });
</script>

<div class="modal-header">
    <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
        <h4 class="modal-title" id="myModalLabel">Nytt Element</h4>
</div>
<div class="modal-body">
	<form id="newElementForm">
        <label for="title">Tittel</label>
		<input type="text" class="form-control" id ="title" name="title" placeholder="Tittel" required/>
        <textarea name="content" id="newElementText" style="width:100%; height:400px" required></textarea>
        <label for="index">Index på siden:</label>
        <div class="form-group">
            <input type="number"  min="1" max="999" class="form control" id="index" name="index"
                data-original-title="Du kan angi indexer fra 1 til 999. Indexen bestemmer hvor høyt opp på siden elementet vil vises, jo lavere index, jo høyere. Om to elemnter har samme index vil det nyeste elementet vises øverst."
                data-toggle="tooltip" data-placement="top" />
        </div>
        <div class="checkbox">   
            <label>
                <input type="checkbox" name="showDate" id="showDate" value="0"> Ikke vis publiserings/redigeringsdato
            </label>
        </div>
        <div class="modal-footer">
            <button type="button" class="btn btn-default" data-dismiss="modal">Lukk</button>
            <input type="button" name="action" class="btn btn-primary" value="Lagre" onClick="javascript:page.storeNewElement(this.form);"/>
        </div>
    </form>
</div>